# -*- coding: utf-8 -*-

# Define here the models for your scraped items
#
# See documentation in:
# https://doc.scrapy.org/en/latest/topics/items.html

import scrapy
from scrapy.loader import ItemLoader
from scrapy.loader.processors import MapCompose, TakeFirst, Join


class TestItem(scrapy.Item):
    title = scrapy.Field()
    content = scrapy.Field()
    cate_id = scrapy.Field()
    desc = scrapy.Field()
    source = scrapy.Field()
    author = scrapy.Field()
    click = scrapy.Field()
    tag = scrapy.Field()
    create_time = scrapy.Field()
    pass


class HuobiItem(scrapy.Item):
    title = scrapy.Field()
    create_time = scrapy.Field()
    source = scrapy.Field()
    content = scrapy.Field()
    is_top = scrapy.Field()
    weight = scrapy.Field()
    cate_id = scrapy.Field()
    desc = scrapy.Field()
    author = scrapy.Field()
    click = scrapy.Field()
    tag = scrapy.Field()
    pass


class MeizituItem(scrapy.Item):
    url = scrapy.Field()
    name = scrapy.Field()
    tags = scrapy.Field()
    image_urls = scrapy.Field()
    images = scrapy.Field()


class CoserItem(scrapy.Item):
    url = scrapy.Field()
    name = scrapy.Field()
    info = scrapy.Field()
    image_urls = scrapy.Field()
    images = scrapy.Field()


class JinSeItem(scrapy.Item):
    title = scrapy.Field()
    desc = scrapy.Field()
    thumb = scrapy.Field()
    content = scrapy.Field()
    source = scrapy.Field()
    weight = scrapy.Field()
    is_top = scrapy.Field()
    author = scrapy.Field()
    click = scrapy.Field()
    content_image_urls = scrapy.Field()
    create_time = scrapy.Field()
    pass


class GateItem(scrapy.Item):
    title = scrapy.Field()
    content = scrapy.Field()
    cate_id = scrapy.Field()
    desc = scrapy.Field()
    source = scrapy.Field()
    author = scrapy.Field()
    click = scrapy.Field()
    tag = scrapy.Field()
    create_time = scrapy.Field()
    pass


class OkexItem(scrapy.Item):
    title = scrapy.Field()
    content = scrapy.Field()
    cate_id = scrapy.Field()
    desc = scrapy.Field()
    source = scrapy.Field()
    author = scrapy.Field()
    click = scrapy.Field()
    tag = scrapy.Field()
    create_time = scrapy.Field()
    pass


class IqiyiItem(scrapy.Item):
    name = scrapy.Field()
    classification = scrapy.Field()
    albumid = scrapy.Field()
    tvid = scrapy.Field()
    pass


class BinanceItem(scrapy.Item):
    title = scrapy.Field()
    content = scrapy.Field()
    cate_id = scrapy.Field()
    desc = scrapy.Field()
    source = scrapy.Field()
    author = scrapy.Field()
    create_time = scrapy.Field()
    pass


class MyItemLoader(ItemLoader):
    default_input_processor = MapCompose(lambda s: s.strip())
    default_output_processor = TakeFirst()
    description_out = Join()
